Skip to content

Conversation

christophfroehlich
Copy link
Contributor

@christophfroehlich christophfroehlich commented Sep 19, 2025

I rewrote the GenericSystem to let the resource_manager handle the value storage. This enables now the support of other data_types than double.

The system now uses the initial values which are automatically set from the URDF. This triggers some behavior change if, e.g., for velocities, no initial values are set and the handles are initialized with NaN. But dynamics calculation afterwards is fixed in this case.

Other minimal behavior changes:

  • applies position_state_following_offset to initial_values in on_activate (has only effect if an initial_value is given)
  • applies mimic.offset only to position interface

The current version iterates over the member variables of the HardwareComponentInterface instead of preallocating the values beforehand. I benchmarked the execution time with a config of 230 interfaces, and it increased from 2us to only 5us. I think this is negligible.

Copy link

codecov bot commented Sep 21, 2025

Codecov Report

❌ Patch coverage is 90.85366% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.46%. Comparing base (c993e5b) to head (3475fc3).

Files with missing lines Patch % Lines
...e_interface/src/mock_components/generic_system.cpp 90.13% 6 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2571      +/-   ##
==========================================
+ Coverage   89.40%   89.46%   +0.06%     
==========================================
  Files         151      151              
  Lines       17024    17047      +23     
  Branches     1420     1410      -10     
==========================================
+ Hits        15220    15251      +31     
+ Misses       1250     1241       -9     
- Partials      554      555       +1     
Flag Coverage Δ
unittests 89.46% <90.85%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...terface/include/mock_components/generic_system.hpp 100.00% <ø> (ø)
...rface/test/mock_components/test_generic_system.cpp 99.73% <100.00%> (+<0.01%) ⬆️
...e_interface/src/mock_components/generic_system.cpp 87.91% <90.13%> (+3.82%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just few minor nitpicks

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks spot on!

Thank you for taking care of the other changes :)

@christophfroehlich christophfroehlich merged commit e8f8c01 into master Oct 15, 2025
13 of 18 checks passed
@christophfroehlich christophfroehlich deleted the Handles_GenericSystem branch October 15, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants